package com.cjx.spring_cloud.controller;

import com.cjx.spring_cloud.service.PaymentFeignService;
import com.cjx.springcloud.entities.CommonResult;
import com.cjx.springcloud.entities.Payment;
import feign.Param;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author cjx
 * @date 2021/5/13 0013 - 22:32
 */
@RestController
@Slf4j
public class OrderFeignController {
    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult<Payment> getPaymentByid(@Param("id") Long id) {
        return paymentFeignService.getPaymentByid(id);
    }

}
